Some more changes from Michael K. Johnson for Linux.
authorJim Blandy <jimb@redhat.com>
Thu, 20 May 1993 02:14:56 +0000 (02:14 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 20 May 1993 02:14:56 +0000 (02:14 +0000)
* s/template.h: Mention that you should #define HAVE_TERMIO or
HAVE_TERMIOS, but not both, and that HAVE_TERMIOS is preferred.
* systty.h (EMACS_SET_TTY_PGRP): Don't assign the return value of
tcsetpgrp to *pgid; it's just a status value.
* config.h.in (HAVE_RANDOM): This shouldn't be defined on Linux
systems using XFree386, and perhaps is inappropriate in general.
* m/intel386.h: #undefine the integer size macros, since the Linux
<values.h> file #defines them itself.
* mem-limits.h (get_lim_data): Linux has the ulimit call; if it
fails, fall back on ULIMIT_BREAK_VALUE.
* process.c: Linux needs the WAITTYPE, etc. definitions.
* unexec.c (hdr, ohdr): Linux has the ordinary `struct exec' type;
no need to use SYSV names.
* s/linux.h: New file.

src/config.in
src/mem-limits.h
src/process.c
src/s/template.h
src/systty.h
src/unexec.c

index e479029a70f72ca21a35c19ffcf65d4d4a8d52a4..0cd0b54dd9444c735f130d489ae5b370676a0250 100644 (file)
@@ -183,8 +183,11 @@ and this notice must be preserved on all copies.  */
 
 /* joe@zircon.uucp says that in order to use XFree386, you have to
    link against -lXbsd, which insists on defining the random
-   function.  */
-#ifdef HAVE_XFREE386
+   function.
+   faith@cs.unc.edu says this is bogus for Linux and several other OS's.
+   Eventually, we should have autoconf test for this.  Anyone want to
+   submit a patch?  */
+#if defined (HAVE_XFREE386) && !defined (LINUX)
 #define LIBX11_SYSTEM -lXbsd
 #define HAVE_RANDOM
 #endif
index 06c8e1f5dd04950b7ddbf7ab0bdc4970a0ef29c7..e2df73ee8d08e33d284b3652d459ea9d6d968af0 100644 (file)
@@ -77,13 +77,20 @@ static void
 get_lim_data ()
 {
   extern long ulimit ();
-    
-#ifdef ULIMIT_BREAK_VALUE
-  lim_data = ULIMIT_BREAK_VALUE;
-#else
+
+  lim_data = -1;
+
+  /* Use the ulimit call, if we seem to have it.  */
+#if !defined (ULIMIT_BREAK_VALUE) || defined (LINUX)
   lim_data = ulimit (3, 0);
 #endif
 
+  /* If that didn't work, just use the macro's value.  */
+#ifdef ULIMIT_BREAK_VALUE
+  if (lim_data == -1)
+    lim_data = ULIMIT_BREAK_VALUE;
+#endif
+
   lim_data -= (long) data_space_start;
 }
 
index 84a4dbd0c7e3a1b0f5b7daaa3e8f4ac96d09c0b6..2b2fc8304dced3a47d494c28be553d6830893e8f 100644 (file)
@@ -110,7 +110,7 @@ static Lisp_Object stream_process;
 
 #ifndef VMS
 #ifndef WAITTYPE
-#if !defined (BSD) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)
+#if (!defined (BSD) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)) || defined (LINUX)
 #define WAITTYPE int
 #define WIFSTOPPED(w) ((w&0377) == 0177)
 #define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0)
index b7abe09e449afe98c3802c2d1922e6aa4082b08f..6460deab05b21bee21a75a5fcb665df29fb4b01a 100644 (file)
@@ -79,16 +79,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /*
  *     Define HAVE_TERMIOS if the system provides POSIX-style
  *     functions and macros for terminal control.
- */
-
-#define HAVE_TERMIOS
-
-/*
+ *
  *     Define HAVE_TERMIO if the system provides sysV-style ioctls
  *     for terminal control.
+ *
+ *     Do not define both.  HAVE_TERMIOS is prefered, if it is
+ *     supported on your system.
  */
 
-#define HAVE_TERMIO
+#define HAVE_TERMIOS
+/* #define HAVE_TERMIO */
 
 /*
  *     Define HAVE_TIMEVAL if the system supports the BSD style clock values.
index a7c682cf7c1f025b49c6bdffa754fc9e268db8ab..897a3c28e93f6927e8c0892622fa76ac9305ad64 100644 (file)
@@ -218,7 +218,7 @@ static struct sensemode {
 #ifdef HAVE_TERMIOS
 
 #define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd)))
-#define EMACS_SET_TTY_PGRP(fd, pgid) (*(pgid) = tcsetpgrp ((fd), *(pgid)))
+#define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid)))
 
 #else
 #ifdef TIOCSPGRP
index 2fb289d8fbac773c836a38fa9cbb3afe6d757c55..e8906fe68ada7d4d9385bf80ae1cd4fcd5d20caf 100644 (file)
@@ -235,7 +235,7 @@ static EXEC_HDR_TYPE hdr, ohdr;
 
 #else /* not HPUX */
 
-#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (COFF_ENCAPSULATE)
+#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (COFF_ENCAPSULATE) && !defined (LINUX)
 static struct bhdr hdr, ohdr;
 #define a_magic fmagic
 #define a_text tsize